package com.acme.bankapp.service.bank;

/**
 * TODO: Please add file description for  @fileBankApplication.java
 * Created: Nov 8, 2013 5:28:47 PM
 */

/**
 * @author Alekov Andrey
 *
 */
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;

import com.acme.bankapp.domain.bank.Account;
import com.acme.bankapp.domain.bank.Bank;
import com.acme.bankapp.domain.bank.Client;
import com.acme.bankapp.domain.bank.Gender;

public class BankApplication {
	final static Logger logger = LoggerFactory.getLogger(BankApplication.class);

	public static void main(String[] args) {
		logger.debug("Create and start Bank App");
		BankApplication bankApp = new BankApplication();
		Bank myBank = new Bank("UniverseBank");
		Client client1 = new Client("Jonh Smith", Gender.MALE);
		Client client2 = new Client("Anna Karenina", Gender.FEEMALE);
		Account account1 = new CheckingAccount(100, 10);
		Account account2 = new SavingAccount(100);
		client1.setAccount((AbstractAccount) account1);
		client2.setAccount((AbstractAccount) account2);
		myBank.addClient(client1);
		myBank.addClient(client2);
		bankApp.printBalance(myBank);
	}

	/**
	 * Modify bank balance
	 */
	public void modifyBank(Bank myBank) {

	}

	/**
	 * Get bank balance
	 */
	public void printBalance(Bank myBank) {
		myBank.printMaximumAmountToWithdraw();
	}
}
